<!-- 分页公共CSS -->
{css href="__STATIC__/admin/public/css/page-common__MIN__.css, __STATIC__/admin/public/jsdate/skin/jedate__MIN__.css" /}

{include file="bread" management="管理员管理" module="管理员列表" /}

<div class="container">
    {include file="search" /}

    {include file="operation" /}

    <!-- 表格开始 -->
    <div class="table-wrap">
        <div class="table-container">
            <table class="table">
                <thead class="table-thead">
                    <tr class="table-tr">
                        <th class="table-th table-selection-wrap">
                            <input id="select_all" class="table-selection" type="checkbox" title="全选" />
                            <label class="table-label-selection" for="select_all" title="全选">
                                <i class="fas fa-check"></i>
                            </label>
                        </th>
                        <th class="table-th">编号</th>
                        <th class="table-th">登录名</th>
                        <th class="table-th">角色</th>
                        <th class="table-th">加入时间</th>
                        <th class="table-th">状态</th>
                        <th class="table-th">操作</th>
                    </tr>
                </thead>
                <tbody class="table-tbody">
                    {empty name="datas"}<tr class="table-tr"><td class="table-td" colspan="100%">暂无数据</td></tr>{/empty}

                    {volist name="datas" id="row"}
                        <tr class="table-tr table-tr-{$row.id}">
                            <td class="table-td table-selection-wrap">
                                <input id="td-selection-{$row.id}" class="table-selection table-td-selection" type="checkbox" value="{$row.id}" title="选择" />
                                <label class="table-label-selection" for="td-selection-{$row.id}" title="选择"><i class="fas fa-check"></i></label>
                            </td>
                            <td class="table-td">{$row.id}</td>
                            <td class="table-td">{$row.name}</td>
                            <td class="table-td">{$row.role}</td>
                            <td class="table-td">{$row.create_time}</td>
                            <td class="table-td table-status-wrap">
                                <input id="td-status-{$row.id}" class="table-status" type="checkbox" title="状态"{if $row.id !== 1} onclick="status(this, '{:Url('admin/Admin/update_status', array('id' => $row.id))}')"{/if}{if $row.id === 1} disabled{/if} {$row.status|filterCheckbox} />
                                <label {if $row.id === 1}style="cursor: no-drop;" {/if}class="table-label-status" for="td-status-{$row.id}" title="状态"></label>
                            </td>
                            <td class="table-td table-operation-wrap icon">
                                <i class="fas fa-pencil-alt" title="编辑" onclick="edit(this, '{:Url('admin/Admin/read', array('id' => $row.id))}')"></i>
                                <i class="fas fa-tools" title="修改密码" onclick="modifyPassword('{:Url('admin/Admin/modify_password', array('id' => $row.id))}')"></i>
                                <i {if $row.id === 1}style="cursor: no-drop;" {/if}class="far fa-trash-alt" title="删除"{if $row.id !== 1} onclick="onDelete(this, '{:Url('admin/Admin/delete', array('id' => $row.id))}')"{/if}></i>
                            </td>
                        </tr>
                    {/volist}
                </tbody>
            </table>
        </div>
    </div>
    <!-- 表格结束 -->

    <!-- 分页开始 -->
    <div class="page-wrap">{$page|raw}</div>
    <!-- 分页结束 -->

    {include file="confirm" /}

    <!-- 表单模态框开始 -->
    <div id="form-modal_frame" class="modal_frame form">
        <div class="modal_frame-container form-modal_frame-container">
            <!-- 模态框头部开始 -->
            <div class="modal_frame-title-wrap form-modal_frame-title" ondblclick="toggleModalFrameFullScreen(event, $(this).find('.full_screen'))">
                <h4 class="modal_frame-title">管理员</h4>
                <div class="modal_frame-btn-wrap">
                    <i class="fas fa-expand-arrows-alt full_screen" onmousedown="toggleModalFrameFullScreen(event, this)"></i>
                    <i class="fas fa-times" onmousedown="hideModalFrame(event, '#form-modal_frame', true)"></i>
                </div>
            </div>
            <!-- 模态框头部结束 -->

            <!-- 模态框身体开始 -->
            <div class="modal_frame-body">
                <!-- 模态框表单开始 -->
                <form class="modal_frame-form" onsubmit="return false">
                    <div class="modal_frame-form-item">
                        <label class="model_frame-form-label" for="name"><i class="model_frame-form-mandatory">*</i>登录名</label>
                        <input id="name" class="model_frame-form-input" type="text" name="name" placeholder="请输入登录名" autocomplete="off" />
                        <i class="far fa-times-circle"></i>
                        <i class="far fa-check-circle"></i>
                        <i class="model_frame-form-mandatory">*</i>
                        <span class="model_frame-form-remind">将会成为您唯一的登入名</span>
                        <p class="modal_frame-form-prompt"></p>
                    </div>
                    <div class="modal_frame-form-item password">
                        <label class="model_frame-form-label" for="password"><i class="model_frame-form-mandatory">*</i>密码</label>
                        <input id="password" class="model_frame-form-input" type="password" name="password" placeholder="请输入密码" />
                        <i class="fas fa-eye" title="查看密码" onclick="togglePassword(this)"></i>
                        <i class="far fa-times-circle"></i>
                        <i class="far fa-check-circle"></i>
                        <i class="model_frame-form-mandatory">*</i>
                        <span class="model_frame-form-remind">长度 5 到 18 个字符</span>
                        <p class="modal_frame-form-prompt"></p>
                    </div>
                    <div class="modal_frame-form-item password">
                        <label class="model_frame-form-label" for="confirm_password"><i class="model_frame-form-mandatory">*</i>确认密码</label>
                        <input id="confirm_password" class="model_frame-form-input" type="password" name="confirm_password" placeholder="请输入确认密码" />
                        <i class="fas fa-eye" title="查看密码" onclick="togglePassword(this)"></i>
                        <i class="far fa-times-circle"></i>
                        <i class="far fa-check-circle"></i>
                        <i class="model_frame-form-mandatory">*</i>
                        <span class="model_frame-form-remind">长度 5 到 18 个字符</span>
                        <p class="modal_frame-form-prompt"></p>
                    </div>
                    <div class="modal_frame-form-item radio">
                        <label class="model_frame-form-label"><i class="model_frame-form-mandatory">*</i>角色</label>
                        <div class="modal_frame-form-item-radio-wrap" title="超级管理员">
                            <input id="超级管理员" class="modal_frame-form-item-radio" type="radio" name="role" class="radio-input" value="0" />
                            <label class="modal_frame-form-item-radio-label"><i class="fas fa-check"></i></label>
                            <label class="modal_frame-form-item-radio-text_label" for="超级管理员">超级管理员</label>
                        </div>
                        <div class="modal_frame-form-item-radio-wrap" title="编辑人员">
                            <input id="编辑人员" class="modal_frame-form-item-radio" type="radio" name="role" class="radio-input" value="1" />
                            <label class="modal_frame-form-item-radio-label"><i class="fas fa-check"></i></label>
                            <label class="modal_frame-form-item-radio-text_label" for="编辑人员">编辑人员</label>
                        </div>
                        <div class="modal_frame-form-item-radio-wrap" title="宣传人员">
                            <input id="宣传人员" class="modal_frame-form-item-radio" type="radio" name="role" class="radio-input" value="2" />
                            <label class="modal_frame-form-item-radio-label"><i class="fas fa-check"></i></label>
                            <label class="modal_frame-form-item-radio-text_label" for="宣传人员">宣传人员</label>
                        </div>
                        <i class="far fa-times-circle"></i>
                        <i class="far fa-check-circle"></i>
                        <i class="model_frame-form-mandatory">*</i>
                        <span class="model_frame-form-remind">管理员身份，如果需要多身份请联系技术人员</span>
                        <p class="modal_frame-form-prompt"></p>
                    </div>
                    <div class="modal_frame-form-item submit">
                        <button class="model_frame-form-submit" type="submit" title="提交" onclick="onSubmit(this)">提交</button>
                    </div>
                </form>
                <!-- 模态框表单结束 -->
            </div>
            <!-- 模态框身体结束 -->
        </div>

        <!-- 背景开始 -->
        <div class="background" onclick="hideModalFrame(event, '#form-modal_frame', true)"></div>
        <!-- 背景结束 -->
    </div>
    <!-- 表单模态框结束 -->

    <!-- 修改密码模态框开始 -->
    <div id="modify_password-modal_frame" class="modal_frame form">
        <div class="modal_frame-container modify_password-modal_frame-container">
            <!-- 模态框头部开始 -->
            <div class="modal_frame-title-wrap modify_password-modal_frame-title" ondblclick="toggleModalFrameFullScreen(event, $(this).find('.full_screen'))">
                <h4 class="modal_frame-title">修改密码</h4>
                <div class="modal_frame-btn-wrap">
                    <i class="fas fa-expand-arrows-alt full_screen" onmousedown="toggleModalFrameFullScreen(event, this)"></i>
                    <i class="fas fa-times" onmousedown="hideModalFrame(event, '#modify_password-modal_frame', true)"></i>
                </div>
            </div>
            <!-- 模态框头部结束 -->

            <!-- 模态框身体开始 -->
            <div class="modal_frame-body">
                <!-- 模态框修改密码开始 -->
                <form class="modal_frame-form" onsubmit="return false">
                    <div class="modal_frame-form-item password">
                        <label class="model_frame-form-label" for="password"><i class="model_frame-form-mandatory">*</i>旧密码</label>
                        <input id="old_password" class="model_frame-form-input" type="password" name="old_password" placeholder="请输入旧密码" />
                        <i class="fas fa-eye" title="查看旧密码" onclick="togglePassword(this)"></i>
                        <i class="far fa-times-circle"></i>
                        <i class="far fa-check-circle"></i>
                        <i class="model_frame-form-mandatory">*</i>
                        <span class="model_frame-form-remind">长度 5 到 18 个字符</span>
                        <p class="modal_frame-form-prompt"></p>
                    </div>
                    <div class="modal_frame-form-item password">
                        <label class="model_frame-form-label" for="password"><i class="model_frame-form-mandatory">*</i>新密码</label>
                        <input id="new_password" class="model_frame-form-input" type="password" name="new_password" placeholder="请输入新密码" />
                        <i class="fas fa-eye" title="查看密码" onclick="togglePassword(this)"></i>
                        <i class="far fa-times-circle"></i>
                        <i class="far fa-check-circle"></i>
                        <i class="model_frame-form-mandatory">*</i>
                        <span class="model_frame-form-remind">长度 5 到 18 个字符</span>
                        <p class="modal_frame-form-prompt"></p>
                    </div>
                    <div class="modal_frame-form-item password">
                        <label class="model_frame-form-label" for="confirm_password"><i class="model_frame-form-mandatory">*</i>确认新密码</label>
                        <input id="confirm_new_password" class="model_frame-form-input" type="password" name="confirm_new_password" placeholder="请输入确认新密码" />
                        <i class="fas fa-eye" title="查看密码" onclick="togglePassword(this)"></i>
                        <i class="far fa-times-circle"></i>
                        <i class="far fa-check-circle"></i>
                        <i class="model_frame-form-mandatory">*</i>
                        <span class="model_frame-form-remind">长度 5 到 18 个字符</span>
                        <p class="modal_frame-form-prompt"></p>
                    </div>
                    <div class="modal_frame-form-item submit">
                        <button class="model_frame-form-submit" type="submit" title="修改密码" onclick="submitModifyPassword(this)">修改密码</button>
                    </div>
                </form>
                <!-- 模态框表单结束 -->
            </div>
            <!-- 模态框身体结束 -->
        </div>

        <!-- 背景开始 -->
        <div class="background" onclick="hideModalFrame(event, '#modify_password-modal_frame', true)"></div>
        <!-- 背景结束 -->
    </div>
    <!-- 修改密码模态框结束 -->
</div>

<!-- JsDate, 日期JS -->
{js href="__STATIC__/admin/public/jsdate/js/jedate.min.js, __STATIC__/admin/public/js/new-jsdate__MIN__.js"}
<!-- 私有JS -->
<script type="text/babel" src="__STATIC__/admin/js/admin__MIN__.js"></script>